package com.tool.btn;

import java.awt.Color;
import java.awt.Font;
import java.awt.event.MouseEvent;

import org.come.Jpanel.TtBmJpanel;
import org.come.socket.Agreement;
import org.come.socket.SendMessageUntil;


public class TtBmbtn
        extends MoBanBtn {
    private int caozuo;
    private TtBmJpanel ttBmJpanel;

    public TtBmbtn(String iconpath, int type, Color[] colors, Font font, String text, int caozuo, TtBmJpanel ttBmJpanel) {
        super(iconpath, type, colors);
        setText(text);
        setFont(font);
        setVerticalTextPosition(0);
        setHorizontalTextPosition(0);
        this.caozuo = caozuo;
        this.ttBmJpanel = ttBmJpanel;
    }



    @Override
    public void chooseyes() {
    }


    @Override
    public void chooseno() {
    }


    @Override
    public void nochoose(MouseEvent e) {
        if (this.caozuo == 1) {
            String sendmes = Agreement.getAgreement().addFrientAgreement("RA");//天梯这里没盖好
            SendMessageUntil.toServer(sendmes);
        } else if (this.caozuo == 2) {
            String sendmes = Agreement.getAgreement().addFrientAgreement("RD");//天梯这里没盖好
            SendMessageUntil.toServer(sendmes);
        }
    }
}


